package com.bdzl.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

/**
 * Collectiona entity. @author MyEclipse Persistence Tools
 * 代理人收藏夹
 */
@Entity
@Table(name = "collectiona")
@DynamicUpdate(true)
public class Collectiona  {

	// Fields

		private Integer id;
		private Agent agent;//代理人ID
		private Integer clauseId;//条款ID	
		private Long time;//	收藏时间
		private Integer type;//0取消收藏 1收藏

		// Constructors

		/** default constructor */
		public Collectiona() {
		}

		/** full constructor */
		public Collectiona(Agent agent, Integer clauseId, Long time,
				Integer type) {
			this.agent = agent;
			this.clauseId = clauseId;
			this.time = time;
			this.type = type;
		}

		// Property accessors
		@Id
		@GeneratedValue
		public Integer getId() {
			return this.id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		@ManyToOne(fetch = FetchType.LAZY)
		@JoinColumn(name = "agent_id")
		public Agent getAgent() {
			return this.agent;
		}

		public void setAgent(Agent agent) {
			this.agent = agent;
		}

		@Column(name = "clause_id")
		public Integer getClauseId() {
			return this.clauseId;
		}

		public void setClauseId(Integer clauseId) {
			this.clauseId = clauseId;
		}

		@Column(name = "time")
		public Long getTime() {
			return this.time;
		}

		public void setTime(Long time) {
			this.time = time;
		}

		@Column(name = "type")
		public Integer getType() {
			return this.type;
		}

		public void setType(Integer type) {
			this.type = type;
		}

}
